﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>报修处理</title>
	<!-- Fav  Icon Link -->
	<link rel="shortcut icon" type="image/png" th:href="@{/images/fav.png}">
	<!-- Bootstrap core CSS -->
	<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
	<!-- themify icons CSS -->
	<link rel="stylesheet" th:href="@{/css/themify-icons.css}">
	<!-- Animations CSS -->
	<link rel="stylesheet" th:href="@{/css/animate.css}">
	<!-- Main CSS -->
	<link rel="stylesheet" th:href="@{/css/styles.css}">
	<link rel="stylesheet" th:href="@{/css/red.css}" id="style_theme">
	<link rel="stylesheet" th:href="@{/css/responsive.css}">
	<link rel="stylesheet" th:href="@{/css/iconfont.css}">
	<!-- morris charts -->
	<link rel="stylesheet" th:href="@{/charts/css/morris.css}">
	<!-- jvectormap -->
	<link rel="stylesheet" th:href="@{/css/jquery-jvectormap.css}">
	<link rel="stylesheet" th:href="@{/datatable/dataTables.bootstrap4.min.css}">

	<script th:src="@{/js/modernizr.min.js}"></script>
</head>

<body>
<!-- Pre Loader -->
<div class="loading" style="display: none;">
	<div class="spinner">
		<div class="double-bounce1"></div>
		<div class="double-bounce2"></div>
	</div>
</div>
<!--/Pre Loader -->
<!-- Color Changer -->
<div class="theme-settings" id="switcher">
		<span class="theme-click">
			<span class="ti-settings"></span>
		</span>
	<span class="theme-color theme-default theme-active" data-color="red"></span>
	<span class="theme-color theme-blue" data-color="blue"></span>
	<span class="theme-color theme-red" data-color="red"></span>
	<span class="theme-color theme-violet" data-color="violet"></span>
	<span class="theme-color theme-yellow" data-color="yellow"></span>
</div>
<!-- /Color Changer -->
<div class="wrapper">
	<!-- Page Content -->
	<div id="content">
		<!-- Top Navigation -->
		<div class="container top-brand">
			<nav class="navbar navbar-default">
				<div class="navbar-header">
					<div class="sidebar-header"> <a href="/index.html"><img src="/images/logo-dark.png" class="logo" alt="logo"></a>
					</div>
				</div>
				<ul class="nav justify-content-end">
					<li class="nav-item">
						<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="/#" role="button" aria-haspopup="true" aria-expanded="false">
							<span class="ti-announcement"></span>
						</a>
						<div class="dropdown-menu lochana-box-shadow2 notifications animated flipInY">
							<h5>Notifications</h5>
							<a class="dropdown-item" href="/#">
								<span class="ti-wheelchair"></span> New Patient Added</a>
							<a class="dropdown-item" href="/#">
								<span class="ti-money"></span> Patient payment done</a>
							<a class="dropdown-item" href="/#">
								<span class="ti-time"></span>Patient Appointment booked</a>
							<a class="dropdown-item" href="/#">
								<span class="ti-wheelchair"></span> New Patient Added</a>
						</div>
					</li>
					<li class="nav-item">
						<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="/#" role="button" aria-haspopup="true" aria-expanded="false">
							<span class="ti-user"></span>
						</a>
						<div class="dropdown-menu lochana-box-shadow2 profile animated flipInY">
							<h5>John Willing</h5>
							<a class="dropdown-item" href="/#">
								<span class="ti-settings"></span> Settings</a>
							<a class="dropdown-item" href="/#">
								<span class="ti-help-alt"></span> Help</a>
							<a class="dropdown-item" href="/#">
								<span class="ti-power-off"></span> Logout</a>
						</div>
					</li>
				</ul>

			</nav>
		</div>
		<!-- /Top Navigation -->
		<!-- Menu -->

		<div th:replace="common :: #adm-Menu"></div>
		<!-- /Menu -->

		<!-- Main Content -->
		<div class="container">

			<div class="row">
				<!-- Widget Item -->
				<div class="col-md-12">
					<div class="widget-area-2 lochana-box-shadow">
						<h3 class="widget-title">报修处理</h3>
						<div class="table-responsive mb-3">
							<div id="tableId_wrapper" class="dataTables_wrapper dt-bootstrap4 no-footer">
								<div class="row">
									<div class="col-sm-12 col-md-6">
										<div class="dataTables_length" id="tableId_length">
											<label>Show <select name="tableId_length" aria-controls="tableId" class="custom-select custom-select-sm form-control form-control-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> entries</label>
										</div>
									</div>
									<div class="col-sm-12 col-md-6">
										<div id="tableId_filter" class="dataTables_filter">
											<label>Search:<input type="search" class="form-control form-control-sm" placeholder="" aria-controls="tableId"></label>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-12">
										<table id="tableId" class="table table-bordered table-striped">
											<thead>
											<tr role="row">
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="报修编号: activate to sort column ascending" >报修编号</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="报修人: activate to sort column ascending" >报修人</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="维修地点: activate to sort column ascending" >维修地点</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="联系方式: activate to sort column ascending" >联系方式</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="报修分类: activate to sort column ascending" >报修分类</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="报修时间: activate to sort column ascending" >报修时间</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="详细: activate to sort column ascending" >详细</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="派工: activate to sort column ascending" >派工</th>
												<th class="sorting" tabindex="0" aria-controls="tableId" rowspan="1" colspan="1" aria-label="删除: activate to sort column ascending" >删除</th>
											</tr>
											</thead>
									<tbody>
									<tr th:each="repair:${undealrepairs}" >
										<td th:text="${repair.repairsId}">维修编号</td>
										<td th:text="${repair.repairsUserId}">报修人id</td>
										<td th:text="${repair.repairsPlace}">报修地点</td>
										<td th:text="${repair.repairsTelephone}">联系电话</td>
										<td>通用/通用其他</td>
										<td th:text="${repair.repairsTime}">报修时间</td>
<!--										<td th:text="${repairs.status}">维修状态</td>-->
										<td><a th:href="@{/adm/toRepairDetail(repairsId=${repair.repairsId})}">详细</a></td>
										<td>
											<a class="nav-link" data-toggle="modal" data-target=".lochana-modal-lg">
												派工
											</a>
											<div class="modal fade lochana-modal-lg" tabindex="-1" role="dialog" aria-hidden="true">
												<div class="modal-dialog modal-lorvens">
													<div class="modal-content lochana-box-shadow2">
														<div class="modal-header">
															<h5 class="modal-title">工表</h5>
															<span class="ti-close" data-dismiss="modal" aria-label="Close">
													</span>
														</div>
														<div class="modal-body">
															<form>
																<div class="form-group">
																	<table  class="table table-bordered table-striped">
																		<tr>
																			<th>维修工</th>
																			<th>单数</th>
																			<th>派工</th>
																		</tr>
																		<tr th:each="repairman:${repairmans}" >
																			<td th:text="${repairman.repairmanName}"></td>
																			<td th:text="${repairman.repairCount}"></td>
																			<td ><a th:href="@{/adm/selectRepairman(repairmanId = ${repairman.userId},repairsId=${repair.repairsId})}">派工</a></td>
																		</tr>
																	</table>
																</div>
															</form>
														</div>
													</div>
												</div>
											</div>

										</td>
										<td>
											<a th:href="@{/adm/deleteRepairs(repairsId=${repair.repairsId})}">
												<span class="iconfont icon-shanchu1" >
												</span>
											</a>

										</td>


									</tr>

									</tbody>
								</table>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-12 col-md-5">
										<div class="dataTables_info" id="tableId_info" role="status" aria-live="polite">Showing 1 to 14 of 14 entries</div>
									</div>
									<div class="col-sm-12 col-md-7">
										<div class="dataTables_paginate paging_simple_numbers" id="tableId_paginate">
											<ul class="pagination">
												<li class="paginate_button page-item previous disabled" id="tableId_previous">
												<a href="#" aria-controls="tableId" data-dt-idx="0" tabindex="0" class="page-link">Previous</a></li>
												<li class="paginate_button page-item active"><a href="#" aria-controls="tableId" data-dt-idx="1" tabindex="0" class="page-link">1</a></li>
												<li class="paginate_button page-item next disabled" id="tableId_next"><a href="#" aria-controls="tableId" data-dt-idx="2" tabindex="0" class="page-link">Next</a></li>
											</ul>
										</div>
									</div>
								</div>
							</div>
							<!--Export links-->
							<nav aria-label="Page navigation example">
								<ul class="pagination justify-content-center export-pagination">
									<li class="page-item">
										<a class="page-link" th:href="@{/#}"><span class="ti-download"></span> csv</a>
									</li>
									<li class="page-item">
										<a class="page-link" th:href="@{/#}"><span class="ti-printer"></span>  print</a>
									</li>
									<li class="page-item">
										<a class="page-link" th:href="@{/#}"><span class="ti-file"></span> PDF</a>
									</li>
									<li class="page-item">
										<a class="page-link" th:href="@{/#}"><span class="ti-align-justify"></span> Excel</a>
									</li>
								</ul>
							</nav>
						</div>
					</div>
				</div>
				<!-- /Widget Item -->
			</div>
		</div>
		<!-- /Main Content -->

	</div>

</div>
<a id="back-to-top" th:href="@{/#}" class="back-to-top">
	<span class="ti-angle-up"></span>
</a>
<!-- /Back to Top -->
<!-- Jquery Library-->
<script th:src="@{/js/jquery-3.2.1.min.js}"></script>
<!-- Popper Library-->
<script th:src="@{/js/popper.min.js}"></script>
<!-- Bootstrap Library-->
<script th:src="@{/js/bootstrap.min.js}"></script>

<!-- Datatable  -->
<script th:src="@{/datatable/jquery.dataTables.min.js}"></script>
<script th:src="@{/datatable/dataTables.bootstrap4.min.js}"></script>

<!-- Custom Script-->
<script th:src="@{/js/custom.js}"></script>

</body>

</html>